package com.umakr.ax.core.aspect;

/**
 * @author gx
 */
public class HandleDataSource {
	private HandleDataSource() {
		throw new IllegalStateException("HandleDataSource class");
	}

	/**数据源名称线程池*/
	private static final ThreadLocal<String> HOLDER = new ThreadLocal<>();

	public static void putDataSource(String datasource) {
		HOLDER.set(datasource);
	}

	public static String getDataSource() {
		return HOLDER.get();
	}

	public static void clear() {
		HOLDER.remove();
	}
}
